{include file="index/header" /}
<body>
	<div class="panel admin-panel">
		<div class="panel-head"><strong class="icon-reorder"> 内容列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
		<div class="padding border-bottom">
			<form id="listform" action="" style="float: left">
				<ul class="search" style="padding-left:10px;">
					<li>搜索：</li>
					<li>
						<input type="{$type}" placeholder="请输入日期" name="time" class="input" style="width:250px; line-height:17px;display:inline-block" value="{$param.time}" />
						<a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a></li>
				</ul>
			</form>
			<div style="float: left;margin-top: 12px; ">
				<input type="radio" class="radio_type" value="" {if $type eq 'month'}checked=""{/if}>月
				<input type="radio" class="radio_type" value="week" {if $type eq 'week'}checked=""{/if}>周
				<input type="radio" class="radio_type" value="day" {if $type eq 'date'}checked=""{/if}>日
			</div>
			<div style="clear: both"></div>
		</div>
		<div class="panel-head"><strong class="icon-reorder"> 实操统计</strong></div>
		<table class="table table-hover text-center">
			<tr>
				<th>老师名称</th>
				<th>总点评数</th>
				{if $admin.role_id neq 6}<th>好评数</th>{/if}
				<th>中评数</th>
				<th>差评数</th>
			</tr>
			{foreach $adminData as $keys=>$admins}
			<tr>
				<td>{$admins}</td>
				<td>{$allData[$keys]['all'] ? $allData[$keys]['all'] : 0}</td>
				{if $admin.role_id neq 6}<td>{$allData[$keys][2] ? $allData[$keys][2] : 0}</td>{/if}
				<td>{$allData[$keys][1] ? $allData[$keys][1] : 0}</td>
				<td><a href="{:url('training_negative',['id'=>$keys,'type'=>$type,'time'=>$param['time']])}" title="点击查看差评详情">{$allData[$keys][3] ? $allData[$keys][3] : 0}</a></td>
			</tr>
			{/foreach}
		</table>
	</div>
	<script type="text/javascript">
		function changesearch(){  
			$("#listform").submit();
		}
		$('.radio_type').click(function(){
			var type = $(this).val();
			if(type) type = '_'+type;
			location.href = '/admin/index/training'+type;
		})
	</script>
</body></html>